home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util1 / yk211src.lha / Yak_2.11_Src / WBStartup / Include / Patch_libs.h < prev    next >
C/C++ Source or Header  |  1995-10-18  |  1KB  |  54 lines

  1. /*
  2. ** Contains all prototypes and types definitions needed to patch libraries 
  3. ** functions safely.
  4. **
  5. ** Author: Gael Marziou
  6. ** Created: 14 July 1994 (Bastille Day ;-)
  7. **
  8. */
  9.  
  10. #include <exec/types.h>
  11. #include <exec/execbase.h>
  12. #include <exec/memory.h>
  13. #include <exec/semaphores.h>
  14. #include <dos/dos.h>
  15. #include <libraries/commodities.h>
  16. #include <string.h>
  17. #include <proto/dos.h>
  18. #include <proto/exec.h>
  19.  
  20. #include "code.h"
  21.  
  22. /* Use a table and an array to make it a little more generic and easier to
  23.  * add functions.
  24.  */
  25.  
  26. struct LVOTable
  27. {
  28.     LONG lt_LVO;
  29.     struct Library *lt_LibBase;
  30.     ULONG lt_oldFunction;
  31.     ULONG lt_newFunction;
  32. };
  33.  
  34. struct JumpTable
  35. {
  36.     struct SignalSemaphore jt_Semaphore;
  37.     UWORD pad_word;
  38.     struct Task *jt_Owner;
  39.     UBYTE jt_Function[6];  /* at least there is one function to patch, each set of
  40.                             * patches will extend this array to store the right number 
  41.                             * of functions
  42.                             */
  43. };
  44.  
  45. /* protos */
  46. BOOL InstallWedge(UBYTE *JTName, struct LVOTable *LVOArray, UBYTE NumberOfFunctions);
  47. BOOL RemoveWedge(UBYTE *JTName, struct LVOTable *LVOArray, UBYTE NumberOfFunctions);
  48.  
  49. /* prototypes for the functions to be SetFunction()'ed. */
  50. #define DEC_LVO(lvoname)   extern lvoname
  51.  
  52.  
  53.  
  54.